d/log-reftests.py: Collect more test results
authorSimon McVittie <smcv@debian.org>
Tue, 16 Feb 2021 00:06:26 +0000 (00:06 +0000)
committerSimon McVittie <smcv@debian.org>
Tue, 16 Feb 2021 00:06:26 +0000 (00:06 +0000)
debian/log-reftests.py

index 51c5b0f26a8756c188296769bd8887ea292eecdf..b06c8d892f1a661204f374fcddb41d9a8c4d2d2b 100755 (executable)
@@ -7,22 +7,55 @@ import sys
 from pathlib import Path
 
 if __name__ == '__main__':
+    for node in Path('testsuite', 'gsk', 'compare').glob('*.node'):
+        for outputs in (
+            Path(
+                'debian', 'build', 'deb', 'testsuite', 'gsk', 'compare',
+                'opengl', 'x11',
+            ),
+            Path(
+                'debian', 'build', 'deb', 'testsuite', 'gsk', 'compare',
+                'broadway', 'x11',
+            ),
+        ):
+            diff = (outputs / (node.stem + '.diff.png'))
+
+            if diff.exists():
+                ref = Path('testsuite', 'gsk', 'compare', node.stem + '.png')
+                out = (outputs / (node.stem + '.out.png'))
+
+                for path in (ref, out, diff):
+                    if path.exists():
+                        print('begin-base64 644 %s' % path)
+                        sys.stdout.flush()
+                        with open(path, 'rb') as reader:
+                            base64.encode(reader, sys.stdout.buffer)
+                        print('====')
+                        print('')
+
+                print('')
+
     for ui in Path('testsuite', 'reftests').glob('*.ui'):
         for outputs in (
-            Path('debian', 'build', 'deb', 'testsuite', 'reftests', 'output', 'x11'),
+            Path(
+                'debian', 'build', 'deb', 'testsuite', 'reftests',
+                'output', 'x11',
+            ),
         ):
             diff = (outputs / (ui.stem + '.diff.png'))
 
-        if diff.exists():
-            ref = (outputs / (ui.stem + '.ref.png'))
-            out = (outputs / (ui.stem + '.out.png'))
+            if diff.exists():
+                ref = (outputs / (ui.stem + '.ref.png'))
+                out = (outputs / (ui.stem + '.out.png'))
 
-            for path in (ref, out, diff):
-                print('begin-base64 644 %s' % path)
-                sys.stdout.flush()
-                with open(path, 'rb') as reader:
-                    base64.encode(reader, sys.stdout.buffer)
-                print('====')
-                print('')
+                for path in (ref, out, diff):
+                    if path.exists():
+                        print('')
+                        print('begin-base64 644 %s' % path)
+                        sys.stdout.flush()
+                        with open(path, 'rb') as reader:
+                            base64.encode(reader, sys.stdout.buffer)
+                        print('====')
+                        print('')
 
-            print('')
+                print('')